<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<title>${message("shop.order.order")}[#if systemShowPowered] - 766 SMART HOME[/#if]</title>
	<meta name="author" content="BIZ Team" />
	<meta name="copyright" content="BIZ" />
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
	<link href="${base}/resources/mobile/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
	[#include "/pad/include/search.ftl" /]
	<div class="content container clearfix">
			<div class="left content_main">
				<nav class="head_nav classification clearfix">
					<h2>订单信息</h2>
				</nav>
				<div class="order_con">
					<dl>
						<dt>
							<h3>${message("shop.order.receiver")}</h3>
							[#if order.member.receivers?size > 4]
								<span id="otherReceiverButton" class="main_color">${message("shop.order.otherReceiver")}</span>
							[/#if]
							<span id="newReceiverButton" class="main_color administration_address"[#if order.member.receivers?size > 4] style="display:none;"[/#if]>${message("shop.order.newReceiver")}</span>
						</dt>
						<dd>
							<form id="receiverForm" action="" method="post">
								<ul class="order_list order_address_list clearfix">
									[#list order.member.receivers as receiver]
									<li class="[#if receiver_index == 0][#assign defaultReceiver = receiver /]selected_method[#elseif receiver_index > 3]hidden[/#if]" receiverId="${receiver.id}">
										<label class="name">${receiver.consignee}${message("shop.order.receive")}</label>${receiver.phone}
										<span>${receiver.areaName}${receiver.address}</span>
									</li>
									[/#list]
								</ul>
								<div id="newReceiver" class="newReceiver [#if order.member.receivers?has_content] hidden[/#if]">
									<ul>
										<li>
											<label><span class="red">*</span>${message("shop.order.consignee")}:</label>
											<span>
												<input type="text" id="consignee" name="consignee" class="text" maxlength="200" />
											</span>
										</li>
										<li>
											<label><span class="red">*</span>${message("shop.order.area")}:</label>
											<select onchange="shopAreaMethod('newReceiverCity',this)" name="areaId_select">
												<option>--请选择--</option>
												[#list areas as item]
													<option value="${item.id}">${item.name}</option>
												[/#list]
											</select>
											<select id="newReceiverCity" name="areaId_select" onchange="shopAreaMethod('newReceiverDistrict',this)">
												<option>--请选择--</option>
											</select>
											<select id="newReceiverDistrict" name="areaId_select" onchange="shopAreaMethod('',this)">
												<option>--请选择--</option>
											</select>
											<input type="hidden" name="areaId" id="areaId" value=""/>
										</li>
										<li>
											<label><span class="red">*</span>${message("shop.order.address")}:</label>
											<span>
												<input type="text" id="address" name="address" class="text" maxlength="200" />
											</span>
										</li>
										<li>
											<label><span class="red">*</span>${message("shop.order.zipCode")}:</label>
											<span>
												<input type="text" id="zipCode" name="zipCode" class="text" maxlength="" />
											</span>
										</li>
										<li>
											<label><span class="red">*</span>${message("shop.order.phone")}:</label>
											<span>
												<input type="text" id="phone" name="phone" class="text" maxlength="11" />
											</span>
										</li>
										<li>
											<label><span class="red">*</span>${message("shop.order.isDefault")}:</label>
											<span>
												<input type="checkbox" name="isDefault" value="true" />
												<input type="hidden" name="_isDefault" value="false" />
											</span>
										</li>
										<li class="newReceiverBtnGroup">
											<label></label>
											<input type="submit" id="newReceiverSubmit" class="_btn" value="${message("shop.order.ok")}" />
											<input type="reset" id="resetReceiverForm" class="_btn" value="${message("shop.order.cancel")}"/>
										</li>
									</ul>
								</div>
							</form>
						</dd>
					</dl>
					<form id="orderForm" action="create.jhtml" method="post">
						<input type="hidden" id="orderType" name="orderType" value="${orderType}"/>
						<input type="hidden" name="jsonParam" value="${jsonParam}"/>
						<input type="hidden" id="order_isTemperature" name="isTemperature" value="${isTemperature}"/>
						<input type="hidden" id="order_isDissipate" name="isDissipate" value="${isDissipate}"/>
						<input type="hidden" id="order_isPromote" name="isPromote" value="${isPromote}"/>
						<input type="hidden" id="order_isController" name="isController" value="${isController}"/>
						<input type="hidden" name="schemeArea" value="${schemeArea}"/>
						<input type="hidden" name="schemeId" value="${schemeId}"/>
						<input type="hidden" id="receiverId" name="receiverId"[#if defaultReceiver??] value="${defaultReceiver.id}"[/#if] />
						<input type="hidden" name="cartToken" value="${cartToken}" />
						<dl>
							<dt>
								<h3>${message("shop.order.paymentMethod")}</h3>
							</dt>
							<dd>
								<ul class="order_list payment_method_list clearfix">
									[#list paymentMethods as paymentMethod]
									<li class="selected_method">
										<input type="radio" name="paymentMethodId" value="${paymentMethod.id}" class="" id="payment_${paymentMethod.id}"/>
										<label class="name" for="payment_${paymentMethod.id}">${paymentMethod.name}</label>
										<span title="${paymentMethod.description}">${paymentMethod.description}</span>
									</li>
									[/#list]
								</ul>
							</dd>
						</dl>
						<dl>
							<dt>
								<h3>${message("shop.order.shippingMethod")}</h3>
							</dt>
							<dd>
								<ul class="order_list distribution_method_list clearfix">
									[#list shippingMethods as shippingMethod]
									<li class="selected_method">
										<input type="radio" name="shippingMethodId" value="${shippingMethod.id}" id="distribution_${shippingMethod.id}"/>
										<label class="name" for="distribution_${shippingMethod.id}">${shippingMethod.name}</label>
										<span title="${shippingMethod.description}">${shippingMethod.description}</span>
									</li>
									[/#list]
								</ul>
							</dd>
						</dl>
						[#if setting.isInvoiceEnabled]
						<dl class="invoice_row">
							<dt>
								<h3>${message("shop.order.invoiceInfo")}</h3>
							</dt>
							<dd>
								<label>${message("shop.order.isInvoice")}：</label>
								<div>
									<input type="radio" id="isInvoice" class='isInvoice' name="isInvoice" value="true" /> 
									<label for='isInvoice'>是</label>
									<input type="radio" id="isInvoice1" class='isInvoice' name="isInvoice"  value="false" checked="checked"/> 
									<label for='isInvoice1'>否</label>
								</div>
							</dd>
							<dd id="invoiceTitleTr" class="hidden">
								<label>
									发票类型：
								</label>
								<div>
									<input type="radio" name="invoiceType" value="0" id='common-invoice' class='invoice_type'/> 
									<label for='common-invoice'>增值税普通发票</label>
									<input type="radio" name="invoiceType" value="1" id='dedicated-invoice' class='invoice_type'/> 
									<label for='dedicated-invoice'>增值税专用发票</label>
								</div>	
							</dd>
							<dd id='common-message' class="hidden">
								<label>
									发票抬头：
								</label>
								<div>
									<input type="text" id="invoiceTitle" name="invoiceTitle" class="text" value="" maxlength="200" />
								</div>
							</dd>
							<dd class="invoice_popup hidden" id="invoicePopup">
								<div>
									<label>专用发票信息 <img src="${base}/resources/shop/images/off-c.png" class="off-c"/></label>
									<div class="invoicePopup_content">
										<ul class="invoice_company">
											<div>1.填写公司信息</div>
											<li>
												<span><label class="red">*</label>单位名称: </span>
												<input type="text" name="organizationName" class='text'/>
											</li>
											<li>
												<span><label class="red">*</label>纳税人识别码: </span>
												<input type="text" name="registrationCode" class='text'/>
											</li>
											<li>
												<span><label class="red">*</label>注册地址: </span>
												<input type="text" name="registerAddress" class='text'/>
											</li>
											<li>
												<span><label class="red">*</label>注册电话: </span>
												<input type="text" name="registerPhone" class='text'/>
											</li>
											<li>
												<span><label class="red">*</label>开户银行: </span>
												<input type="text" name="bankOfDeposit" class='text'/>
											</li>
											<li>
												<span><label class="red">*</label>银行账户: </span>
												<input type="text" name="bankAccount" class='text'/>
											</li>
											<li>
												<span></span>
												<div class="invoice-btn">
													<button class="invoice-nextStep" type="button">下一步</button>
													<button class="off-c" type="button">取消</button>
												</div>
											</li>
										</ul>
										<ul class="invoice_personage hidden">
											<div>2.填写个人信息</div>
											<li>
											<span>
												<label class="red">*</label>收票人姓名: </span>
												<input type="text" class='text' name="consignee"/>
											</li>
											<li>
												<span><label class="red">*</label>收票人电话: </span>
												<input type="text" class='text' name="phone"/>
											</li>
											<li>
												<span><label class="red">*</label>收票人地址: </span>
												<input type="text" class='text' name="address" />
											</li>
											<li>
												<span></span>
												<div class="invoice-btn">
													<button class="save_invoiceInfo" type="button">保存</button>
													<button class="off-c" type="button">取消</button>
												</div>
											</li>
										</ul>
									</div>
								</div>
							</dd>
						</dl>
						[/#if]
						<dl>
							<dt>
								<h3>${message("shop.order.shopAreaInfo")}</h3>
							</dt>
							<dd>
								<ul class="area_list clearfix">
									<li>
										<label>省:</label>
										<select onchange="shopAreaMethod('shopAreaCity',this)">
											<option value="">--请选择--</option>
												[#if areas??]
													[#list areas as item]
														<option value="${item.id}">${item.name}</option>
													[/#list]
												[/#if]
										</select>
									</li>
									<li>
										<label>${message("shop.order.shopAreaCity")}:</label>
										<select id="shopAreaCity" class="city" onchange="shopAreaMethod('shopAreaDistrict',this)">
											<option value="">--请选择--</option>
										</select>
									</li>
									<li>
										<label>${message("shop.order.shopAreaDistrict")}:</label>
										<select id="shopAreaDistrict" class="district" onchange="shopInfoMethod('shopInfo',this)">
											<option value="">--请选择--</option>
										</select>
									</li>
									<li>
										<label>${message("shop.order.shopInfo")}:</label>
										<select id="shopInfo" name="shopId">
											<option value="">--请选择--</option>
										</select>
									</li>
								</ul>
							</dd>
						</dl>
							[#if order.orderType==2]
							<dl>
								<dt>
									<h3>方案信息</h3>
								</dt>
								<dd>
									<table class="scheme_tab">
										<tr>
											<td>
												方案名称:
											</td>
											<td>
												${order.schemeName}
											</td>
										</tr>
										<tr>
											<td>
												方案总价:
											</td>
											<td>
												${order.amount?string.currency}
											</td>
											<td>
												方案面积:
											</td>
											<td>
												${order.schemeArea}㎡
											</td>
										</tr>
										<tr>
											<td>
												支付比例:
											</td>
											<td>
												${order.percent}%
											</td>
											<td>
												首次应支付:
											</td>
											<td class="subtotal">
												${order.percentPrice?string.currency}
											</td>
										</tr>
									</table>
								</dd>
							</dl>
							[/#if]
							[#if order.orderType==1]
							<dl>
								<dt>
									<h3>确认订单信息</h3>
								</dt>
								<dd>
									<table class="order_tab">
										<tr>
											<th>${message("shop.order.product")}</th>
											<th>订单类型</th>
											<th>${message("shop.order.price")}</th>
											<th>${message("shop.order.quantity")}</th>
											<th>${message("shop.order.subTotal")}</th>
										</tr>
										[#list order.orderItems as orderItem]
											<tr>
												<td>
													<img src="[#if orderItem.product.thumbnail??]${orderItem.product.thumbnail}[#else]${setting.defaultThumbnailProductImage}[/#if]" alt="${orderItem.product.name}" />
													<label class="product_name">${abbreviate(orderItem.product.fullName, 35, "...")}</label>
													[#if orderItem.isGift]
														<span class="red">[${message("shop.order.gift")}]</span>
													[/#if]
												</td>
												<td>${message("Project.type."+ orderItem.orderType)}</td>
												<td>
													[#if !orderItem.isGift]
														${currency(orderItem.price, true)}
													[#else]
														-
													[/#if]
												</td>
												<td>
													${orderItem.quantity}
												</td>
												<td class="subtotal">
													[#if !orderItem.isGift]
														${currency(orderItem.subtotal, true)}
													[#else]
														-
													[/#if]
												</td>
											</tr>
										[/#list]
									</table>
							[#else]
							<dl>
								<dt>
									<h3>确认方案信息</h3>
								</dt>
								<dd>
									<table class="order_tab">
										<tr>
											<th>主材名称</th>
											<th>订单类型</th>
											<th>品牌</th>
											<th>规格</th>
										</tr>
										[#list order.orderItems as orderItem]
											<tr class="[#if orderItem.name=="温控" || orderItem.name="面板" ][#if !order.isTemperature]hidden[/#if] [#elseif orderItem.name=="卫浴散热器"][#if !order.isDissipate]hidden[/#if][#elseif orderItem.name=="提升泵"][#if !order.isPromote]hidden[/#if][#elseif orderItem.name="控制器"][#if !order.isController]hidden[/#if][#else][/#if]">
												<td>
													<img src="[#if orderItem.schemeImage??]${orderItem.schemeImage}[#else]${setting.defaultThumbnailProductImage}[/#if]" alt="${orderItem.schemeProductName}" />
													${orderItem.name}
													[#if orderItem.isGift]
														<span class="red">[${message("shop.order.gift")}]</span>
													[/#if]
												</td>
												<td>${message("Project.type."+ orderItem.orderType)}</td>
												<td>${orderItem.schemeProductBrand}</td>
												<td>${orderItem.schemeProductSpecificationValue}</td>
											</tr>
										[/#list]
									</table>
								[/#if]
							</dd>
							<dd class="clearfix price_row">
								<div class="left float_f">
									<label>${message("shop.order.memo")}:</label>
									<textarea name="memo" rows="1" cols="30" class="message" maxlength="200" placeholder="选填，可填与卖家达成一致的要求"></textarea>
								</div>
								<div class="right float_r">
									<label for="">实际支付（含运费）：</label>
									<span class="red">￥<span id="payment" class="payment font-bold">0.00</span></span>
								</div>
							</dd>
							<dd>
								<div class="order_sub_row float_r">
									<a href="${base}/pad/cart/list.jhtml">${message("shop.order.back")}</a>
									<button type="button" id="orderSub" class="_btn font-bold" />${message("shop.order.submit")}</button>
								</div>
							</dd>
						</dl>
						<input type="hidden" id="pad_order_token" value="${token}"/>
					</form>
				</div>
			</div>
			[#include "/pad/include/aside.ftl" /]
		</div>
	[#include "/pad/include/footer.ftl" /]
	<script type="text/javascript" src="${base}/resources/public/js/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" src="${base}/resources/shop/js/common.js"></script>
	<script type="text/javascript">
		var base ="${base}";
	</script>
	<script type="text/javascript" src="${base}/resources/mobile/js/public.js"></script>
	<script type="text/javascript" src="${base}/resources/shop/js/jquery.lSelect.js"></script>
	<script type="text/javascript" src="${base}/resources/shop/js/jquery.validate.js"></script>
	<script type="text/javascript" src="${base}/resources/mobile/js/order.js"></script>
	
</body>
</html>